from fastapi import FastAPI
from routers import router as ui_router
import uvicorn
import sys

tags_metadata = [
    {
        'name': 'UI系统',
        'description': 'UI界面的相关API'
    }
]

app = FastAPI(openapi_tags=tags_metadata)
app.include_router(ui_router)

if __name__ == '__main__':
    host = sys.argv[1]
    port = int(sys.argv[2])
    reload = True if sys.argv[3] == 'true' else False
    uvicorn.run('server:app', host=host, port=port, reload=reload)